HSTD refactored as classes