Refactored the code to better places. Changed db API. Totally breaking.