Removing synta errors and setting up database