Splitting the executable into a dynamic shared library, a main executable, and a separate executable for unit tests