Improved documentation and module refacto