Created comments for trimming the white space

Created comments for trimming the white space, while loops and if
statement