Encoder almost done. Object encoding test failed
Fix bug in object encoder
Add common tests. Fix formating