Refactor for shared automated build.