Some big changes to try and fix the library path