Updated documentation and fixed minor things