Remove error.go
Move core to separate package