Improving code design and readability, as well as CS3/4 compatibility