move core sources to core module