clean up some code
much better working example, with more real world use cases. url routing is still broken