Refactored core to a dll.