Refactoring complete. Major clean up, get "default" routines implemented, others are still to-do