code modernization: sorted imports, use decorators, utf8 headers.

ready to merge after masters jenkins is green again