Remove debugging code
Better variable names
Minor name and syntax change