Edited the restrictions so that it is all within the controller.