refactor build tools