Lots of changes to equation solving