Rewrote router

Updated the router class to handle full key matches. Nesting folders
under an extension to group extensions whilst allowing more complex
routes.