Improved documentation and code structure.