Implemented 5737
Main structures are hashes, but still there are a couple of TODOs