Change dispatching to include the query string. Will allow both json and html output