Removed old code and fixed del