Initial code commit

Untested code modified from the dancing code by Mark Koh. Unsure which files are
actually necessary.