Changes and tweaks to try and get this working.