Initial code and Readme

Needs commenting.