Heavy refactoring main loading to move all back end stuff into service