Refactor unit test precompile