pyami module: tidy up to meet PEP8 better

Only some style changes (plus omitting one uneeded import) :)