Implement code dispatch. Fixes #9.
Merge pull request #19 from mkremins/code-dispatch

Initial work on code dispatch