Refactored many files, including commander module