More documentation, bug fixes