Initial upload

Complete Rev 2 Code. Undocumented, comments will come in next commit.