cleaned up comments and migrated all refactored code to main library
removed temporary refactoring scratchpad