Massive cleanup of code and finished migrating data from old database