reorganize build directory and loader usage