[WIP] Work on API extension and unit tests

Change-Id: Iae2eeb474eb6ce19373e62ed89b032388f83cbed