HSTD refactored as classes
Removed dead service mode code
Initial switch test