fix build + make `core` into a proper crate