Removed all class variables and broke up methods to simplify complexity.