turn entity and relation rendering code into re-usable functions