Missing import and PEP8
Fix amendment encoder; update tests
Add fix and test case for a title disappearing