Refactor build and packaging

breakline