move schemas and get core funciton togethe