A few tweaks and comments
Gave comments for each function