[18] Code commented, some code improvements made