Clean up and removed outdated code