Refactored the build system to simplify the build process for unit tests.