Clean up references, etc.