Add Output class
Change API a lot. Documentation still needed