Cleaning up - more comments, and better variable names