Moved some code to the generic namespace