Updated var names and added comments