cleaned up form and added basic validation