Move testing suite into main executable, only build when TESTS flag is defined