Render code cleanup, entity cleanup and paths