Implemented new method of refactoring.
Updated build system with refactoring.