Cleaned up cleaning up routine