Fixed issue with resetting previous tabindex on node that was removed
Optimized memorycode
intermediate changes