FredrichO - Added documentation to code.