Add encoding line
Fix handling ordinals
PEP8