misc library cleanup
xnest should be working now