Update 2.5

Combined Andrews code and fixes into the latest version