Separate controller into own JS file