Refactor and add specs for usage and command set