Better variable names and some housekeeping