Cleaned up variable names and comments