Minor refactoring/changes