Some cleanup, PDO, and /some/ SQLi protection... I think