General cleanup of API related code

Change-Id: Icb7099e428898083f899039429d1e9e41b114cfb
Merge "General cleanup of API related code"