Added documentation to the front-end code.