dont generate zero length arrays (bit pointless to generate a class with no functions though...)
various fixes for msvc compilation
fix tests for msvc
update reflect