Refactoring.. for better or worse
Fix Travis build (fingers crossed)