Cleaned up the renderer initialization code, restructured it by separating initializations into smaller functions, each with their own branch of objects.