Added comments and eliminate extra indents