Rework build scripts