minor refactoring, and separated out Commands into folder