add stoponwarning option

Closes #33 

Also cleaning up the tests a bit here.