Renamed some methods and added documentation to the public ones.