Fix formatting
Add some fields for encoding