Restructuring Core

Restructured Core's import/export so that it is easier to use only the
functions you need to write plugins