Consistent variable names, improved comments, and code formatting