First real commit

Untested. May not be functional.