Bug fixes and complete glm doc