Improved memory management lib and deleted cursor from screen