Type check optional arguments.
More Format stuff.
Switch from int32_t to int to match libxl, streamline type handling.