refactor of command handling. removed enum approach and swapped it out with an inheritance based approach.