Moved some generic functions to the 'core' package