Removing commented code. Fixing issues detected with new database schemas