Cleanup of old code