Fixed comments, renamed vars