cleaned up controller file, removed comments and json actions