Bug fixes and documentation updated.