Big refactoring of helper classes