Add unit tests
Add command class
Minor fixes