Removed old code from legacy version