Moved the sugar functions into their own module