Merge changes I6018791a,Id81c93ea

* changes:
  Convert merged module lib stub to api.go
  Some minor tweaks for api.go