Clean up renderer code