Lots of changes throughout the code.