remove unsafe Maybe
remove last Unsafe usage
a lot more cleanup
more tests