Added documentation where necessary.