Minor improvements

A bit of PEP 8 and a demo written in a clearer and more elegant way.