Fix iterators (issue #198)
Fix compile with MSVC (issue #199)

And use a macro to make type initialization shorter.
Merge branch 'master' into next