Fixed node deletion, cache and databases cleanup