Minor code clean-up, refactor