Cleaned up render utility