Fix/refactoring - Minor refactored changes

These are slight changes. Please see if they can be merged.