Moved from size_t to simple int to simplify wrapper creator.It's the middle of the night and I'm really tired...