Improve HierarchicalALS constructor and add tests