cleaned up controller, fixed double submit issue