Added documentation, removed useless comments