scope - memory leaks and other fixes, tips about Memory