Composer+travis

- Updated composer
- Added travis.yml
- Moved some things into a class hierarchy
- Reformat + cleanup