Added the ability to match routes on HTTP method too.

* Implemented a separate Route class.
* Implemented a general interface for layers.