API Doc Update

Updated the API reference documentation, including several bug fixes from Alexey's bugs.