finish disconnect library; cleanup library code