Improved testing and refactored package