[api2] Add apis for messages, optimize coding
[api2] Fixed util bugs
Merge branch 'poet'