Restructured class Controller and implemented some additional functions.
Restructured class Controller and implemented some additional functions.