Changed variable names, added comments