Added comments, fixed vars