Removed legacy code
Fixed schema