Added some comments.
Renamed defined variables