QXlib update and better memory management