Initial commit

Fully tested code and drafted documentation.