clean up for pure api

Signed-off-by: Boqun Feng <boqun.feng@linux.vnet.ibm.com>