Adding coverage, license and format
(cherry picked from commit e55b16a)
fix format and compiling error