Reworking expect ion handling and also reworking the API a bit