mysql_escape, comments and tidy-up