Minor refactoring

Signed-off-by: Adam McNicol <adamsorders@mac.com>