Clean up url resolver code.
Change app access API.