Sanitized the key values in the $_POST array and cleaning up some scratch code.