Trying out bitarray
Switched to leveldb for ref lookup