Refactory build steps