Added documentation and deleted unuseful comments