Move build configuration logic into a directory