Intermediate commit of code mostly complete, but still not quite functional