Updated documentation, bug fixes