Added some support for file extensions in router. Used to determine desired output type from uri.