Added documentation throughout