added some comments

and made code sexy