Small syntax change

Added var to properly declare variables in the right scope, added small
comment.