Minor refactor to use Object.keys