Doing a bit of refactoring

Removing anonymous functions and placing into a class environment.