Bunch of refactoring on the new build