Moved input checks to the controller