Small cleanup
Small refactoring and cleanup