Clean up and update references