bugs fixed, inlined new/free for type instance, stack removed