Fixed an issue with the database
Fixed and cleaned code