Need to pass all libraries/catlog by reference, see if you can use auto.