MOB-831: Bunch of refactorings