removed classes and replaced with private methods