Initial martini integration
Simplify output actions

Use martini's functions to do the URI parsing, routing etc.
Use martini handler to find output.

This reduces the duplication of code somewhat.