Memory fixes in order for notebooks to run in the VM and syntax cleapup