Move command method from activity to controller