A tiny bit of refactoring and code clean up