Minor refactor / code cleanup