doc updates and bug fixes