Minor fixes and better documentation