massive refactoring, clean exported api
trying travis