libraries upgrade and small improvements