new helper method getMainPagePartialUrl() and unit test for getReturnToFromQuery()