default form values and cleaned up some js code (its still messy though)