Improved documentation and readability