Issue #83 fixes

Hallo Andreas,
These patches are the result of our work with Alfred on yesterday's Canoo Hackergarten.
I also updated the tests to reflect our changes, they all pass on my Windows and Linux machines.
Regards,
Adam Folmert