Added bunch of refactors