Rewrote to work with CMD library and made classes for future building