Edited delete methods to ensure no null pointer exceptions when trying to access data of flyweight nodes.