Cleaned up resilient old code