Move some classes from the core module into the library