diff --git a/swarm/api/http/server.go b/swarm/api/http/server.go
index b4294b0581f2b270fe828075b97fe16c6ceb2472..de1eb70dcff251b07c5b957c69ae0a46e625556f 100644
--- a/swarm/api/http/server.go
+++ b/swarm/api/http/server.go
@@ -41,16 +41,9 @@ import (
 	"github.com/ethereum/go-ethereum/swarm/log"
 	"github.com/ethereum/go-ethereum/swarm/storage"
 	"github.com/ethereum/go-ethereum/swarm/storage/feed"
-
 	"github.com/rs/cors"
 )
 
-type resourceResponse struct {
-	Manifest storage.Address `json:"manifest"`
-	Resource string          `json:"resource"`
-	Update   storage.Address `json:"update"`
-}
-
 var (
 	postRawCount    = metrics.NewRegisteredCounter("api.http.post.raw.count", nil)
 	postRawFail     = metrics.NewRegisteredCounter("api.http.post.raw.fail", nil)
diff --git a/swarm/network/protocol_test.go b/swarm/network/protocol_test.go
index 4b83c7a278ea79b88cf4649418bb1b0f942b45d4..cdf370f35926d9c2805c98f7f032604301b57302 100644
--- a/swarm/network/protocol_test.go
+++ b/swarm/network/protocol_test.go
@@ -50,10 +50,6 @@ type testStore struct {
 	values map[string][]byte
 }
 
-func newTestStore() *testStore {
-	return &testStore{values: make(map[string][]byte)}
-}
-
 func (t *testStore) Load(key string) ([]byte, error) {
 	t.Lock()
 	defer t.Unlock()
diff --git a/swarm/pot/address.go b/swarm/pot/address.go
index 3974ebcaac7bc47509068f95eaa1fdc961f1c51a..728dac14eed86831152db29f07de8b233eb7d2ba 100644
--- a/swarm/pot/address.go
+++ b/swarm/pot/address.go
@@ -79,46 +79,6 @@ func (a Address) Bytes() []byte {
 	return a[:]
 }
 
-/*
-Proximity(x, y) returns the proximity order of the MSB distance between x and y
-
-The distance metric MSB(x, y) of two equal length byte sequences x an y is the
-value of the binary integer cast of the x^y, ie., x and y bitwise xor-ed.
-the binary cast is big endian: most significant bit first (=MSB).
-
-Proximity(x, y) is a discrete logarithmic scaling of the MSB distance.
-It is defined as the reverse rank of the integer part of the base 2
-logarithm of the distance.
-It is calculated by counting the number of common leading zeros in the (MSB)
-binary representation of the x^y.
-
-(0 farthest, 255 closest, 256 self)
-*/
-func proximity(one, other Address) (ret int, eq bool) {
-	return posProximity(one, other, 0)
-}
-
-// posProximity(a, b, pos) returns proximity order of b wrt a (symmetric) pretending
-// the first pos bits match, checking only bits index >= pos
-func posProximity(one, other Address, pos int) (ret int, eq bool) {
-	for i := pos / 8; i < len(one); i++ {
-		if one[i] == other[i] {
-			continue
-		}
-		oxo := one[i] ^ other[i]
-		start := 0
-		if i == pos/8 {
-			start = pos % 8
-		}
-		for j := start; j < 8; j++ {
-			if (oxo>>uint8(7-j))&0x01 != 0 {
-				return i*8 + j, false
-			}
-		}
-	}
-	return len(one) * 8, true
-}
-
 // ProxCmp compares the distances a->target and b->target.
 // Returns -1 if a is closer to target, 1 if b is closer to target
 // and 0 if they are equal.
diff --git a/swarm/pss/client/client_test.go b/swarm/pss/client/client_test.go
index 48edc6ccef5c117bbc6af6edf62ac784a96ec73b..cfef3c7947ae97aac6a16d1dcd06ce9780b07c34 100644
--- a/swarm/pss/client/client_test.go
+++ b/swarm/pss/client/client_test.go
@@ -288,10 +288,6 @@ type testStore struct {
 	values map[string][]byte
 }
 
-func newTestStore() *testStore {
-	return &testStore{values: make(map[string][]byte)}
-}
-
 func (t *testStore) Load(key string) ([]byte, error) {
 	return nil, nil
 }
diff --git a/swarm/pss/pss_test.go b/swarm/pss/pss_test.go
index 574714114b40c662851ce0147211c63d61f3b42a..66a90be6207ab91581cc271c10ac3f13d9450cf0 100644
--- a/swarm/pss/pss_test.go
+++ b/swarm/pss/pss_test.go
@@ -976,11 +976,6 @@ func TestNetwork10000(t *testing.T) {
 }
 
 func testNetwork(t *testing.T) {
-	type msgnotifyC struct {
-		id     enode.ID
-		msgIdx int
-	}
-
 	paramstring := strings.Split(t.Name(), "/")
 	nodecount, _ := strconv.ParseInt(paramstring[1], 10, 0)
 	msgcount, _ := strconv.ParseInt(paramstring[2], 10, 0)
diff --git a/swarm/pss/types.go b/swarm/pss/types.go
index 1e33ecdcacf0620db9eb9404244e7367f178ba2c..56c2c51dc0c0576da61ead15fbcd231fe1a5cf00 100644
--- a/swarm/pss/types.go
+++ b/swarm/pss/types.go
@@ -169,10 +169,6 @@ type stateStore struct {
 	values map[string][]byte
 }
 
-func newStateStore() *stateStore {
-	return &stateStore{values: make(map[string][]byte)}
-}
-
 func (store *stateStore) Load(key string) ([]byte, error) {
 	return nil, nil
 }
diff --git a/swarm/storage/common_test.go b/swarm/storage/common_test.go
index 33133edd74cdfc9dcb30d9b06931437112d5c4bc..600be164a957e70b6cf428618871773542725e5b 100644
--- a/swarm/storage/common_test.go
+++ b/swarm/storage/common_test.go
@@ -88,17 +88,6 @@ func mputRandomChunks(store ChunkStore, n int, chunksize int64) ([]Chunk, error)
 	return mput(store, n, GenerateRandomChunk)
 }
 
-func mputChunks(store ChunkStore, chunks ...Chunk) error {
-	i := 0
-	f := func(n int64) Chunk {
-		chunk := chunks[i]
-		i++
-		return chunk
-	}
-	_, err := mput(store, len(chunks), f)
-	return err
-}
-
 func mput(store ChunkStore, n int, f func(i int64) Chunk) (hs []Chunk, err error) {
 	// put to localstore and wait for stored channel
 	// does not check delivery error state
diff --git a/swarm/storage/feed/handler_test.go b/swarm/storage/feed/handler_test.go
index cf95bc1f57f7e39af86daa70966e4eafaab8486a..fb2ef3a6ba50af23b555a87be59950f912a3d22a 100644
--- a/swarm/storage/feed/handler_test.go
+++ b/swarm/storage/feed/handler_test.go
@@ -27,7 +27,6 @@ import (
 	"time"
 
 	"github.com/ethereum/go-ethereum/crypto"
-
 	"github.com/ethereum/go-ethereum/log"
 	"github.com/ethereum/go-ethereum/swarm/chunk"
 	"github.com/ethereum/go-ethereum/swarm/storage"
@@ -506,15 +505,3 @@ func newCharlieSigner() *GenericSigner {
 	privKey, _ := crypto.HexToECDSA("facadefacadefacadefacadefacadefacadefacadefacadefacadefacadefaca")
 	return NewGenericSigner(privKey)
 }
-
-func getUpdateDirect(rh *Handler, addr storage.Address) ([]byte, error) {
-	chunk, err := rh.chunkStore.Get(context.TODO(), addr)
-	if err != nil {
-		return nil, err
-	}
-	var r Request
-	if err := r.fromChunk(addr, chunk.Data()); err != nil {
-		return nil, err
-	}
-	return r.data, nil
-}
diff --git a/swarm/storage/ldbstore.go b/swarm/storage/ldbstore.go
index 49508911f99e5486430d308367ff7e2eab1626f1..9feb6874138f4e7162a5c0da2fb1f6e5d4bc3c78 100644
--- a/swarm/storage/ldbstore.go
+++ b/swarm/storage/ldbstore.go
@@ -39,7 +39,6 @@ import (
 	"github.com/ethereum/go-ethereum/swarm/log"
 	"github.com/ethereum/go-ethereum/swarm/storage/mock"
 	"github.com/syndtr/goleveldb/leveldb"
-	"github.com/syndtr/goleveldb/leveldb/opt"
 )
 
 const (
@@ -72,13 +71,6 @@ var (
 	ErrDBClosed = errors.New("LDBStore closed")
 )
 
-type gcItem struct {
-	idx    *dpaDBIndex
-	value  uint64
-	idxKey []byte
-	po     uint8
-}
-
 type LDBStoreParams struct {
 	*StoreParams
 	Path string
@@ -961,15 +953,3 @@ func (s *LDBStore) SyncIterator(since uint64, until uint64, po uint8, f func(Add
 	}
 	return it.Error()
 }
-
-func databaseExists(path string) bool {
-	o := &opt.Options{
-		ErrorIfMissing: true,
-	}
-	tdb, err := leveldb.OpenFile(path, o)
-	if err != nil {
-		return false
-	}
-	defer tdb.Close()
-	return true
-}
diff --git a/swarm/storage/types.go b/swarm/storage/types.go
index 8c70f458482bcd2175b2a94a8e5cf9e090c287f9..ada86831fc72f72c02462fb2330916cbd1c5172f 100644
--- a/swarm/storage/types.go
+++ b/swarm/storage/types.go
@@ -80,6 +80,19 @@ func (a Address) bits(i, j uint) uint {
 	return res
 }
 
+// Proximity(x, y) returns the proximity order of the MSB distance between x and y
+//
+// The distance metric MSB(x, y) of two equal length byte sequences x an y is the
+// value of the binary integer cast of the x^y, ie., x and y bitwise xor-ed.
+// the binary cast is big endian: most significant bit first (=MSB).
+//
+// Proximity(x, y) is a discrete logarithmic scaling of the MSB distance.
+// It is defined as the reverse rank of the integer part of the base 2
+// logarithm of the distance.
+// It is calculated by counting the number of common leading zeros in the (MSB)
+// binary representation of the x^y.
+//
+// (0 farthest, 255 closest, 256 self)
 func Proximity(one, other []byte) (ret int) {
 	b := (MaxPO-1)/8 + 1
 	if b > len(one) {