Javascript dispatcher

so the javascript dispatcher is still a little rough, but this is a great place to start.