cleaned up the navigation, moved sql into the dbconfig file to remove hardcoding.