Minor refactor to fix namespacing issues