Added controller action handling
Redesigned the router