Clean up transition to a class structure
remove functional paradigm