Reorganize build definition