Initial documentation
Misc fixes