More modularizing

Moving the query router into a library, added service app to start tests