Rearranging

Cleaning up some stuff and using bindParam for form variables.