better variable names and cleanup