Updated documentation and minor code modifications