Fix code issues. Add SQL database file