Moved some relations to core; implemented expansion for Function