Ported database module, added some documentation, add Hamming code