Moved (reverted) some struct definitions to api.c. MSVS doesn't like them in .h