initial import
First big refactor
Initial export