First implementation of importing

This still needs a lot of work