Cleaned up

Cleanup, removed delegates and updated to use action and Func