Various fixes and doc'