Move some interfaces and exceptions to the core