Changed interfaces to classes

And moved them to core directory