More error handling and minor fixes. Removed some documentation that was out of date.