Fix some oversight in hmsb and clean up implementation files