Added the actual code.

This is the old version. I haven't pulled the newest version from my
work computer, so I'll just fix this one on my own time. The old version
is kinda broken anyways too, so it works out.