Create and cleanup master maintenance process

Refactoring into a new class and maint routines broken up.