Refactor kernel objects

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
Add options to customize formatter

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>