cleaned code inserted additional comments

Meets with coding standards