Compiler:
- Generated C++ api code bugfixes
- Generated cli code bugfixes
Library:
- Minor internal api cleanup

Change-Id: Ia98b016d11d23332c6220a08b0f4208694c62bf8