Moar tests & fixes to issues discovered during testing