Code cleanup (in Entity render method)