Restructure build process