Deal with output of integer through reference with embind. embind refactor seems to be pretty much done
Finished refactoring, now using embind, API changes, see docs or switch to OBSOLOTE_API branch