Update API implementation and some bug fixes.