Clientside Router written in Node.js style to be used with Browserify