Changes in controller class

Created new class and moved methods from controller there