refactor interfaces into core (away from plugin)