Adding tests and pimping docs