Cleaned renderer code