refactoring

Refactored file layouts and added in an autoloader and example for
writing CSV, more examples to follow shortly