code cleanup, no need for local methods in commands