Added support for route metadata

Changes and discussions on this can be found on issue #1486