Added some notes in comments