Added documentation, comments