Added documentation and fixed the signature of some of the methods.