readability changes and performance enhancements