Trying to sort out various library problems