Initial code commit

Will not compile, not tested.