cleaned up files in Database + minor fixes