Adjust some interfaces to optimize caller codes

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>