Move the common functions into their own namespace