work in progress: refactor Commands.pm