Finished input validation and sanitation.