features added

I added some helper definitions, tweaked the assertions, and added preliminary (untested!) support for windows