Cleaned up the style: variable names and comments