streamlined helper classes & fixed some bugs