Fixing routing errors and databse int to integer stuff