Add main method controller and listener