Made small refactoring required for using code in other project