Packaged code in onCommand, into functions and put them in a new class