Restructure build system