moved submit code to json controller, removed commented out methods