Added comments for understandibility
Edited comments for readibility