Functionality for swapping libraries