code cleanup. updating SQL commands for password protected database.