some 2.7 fixes and PEP-8 style enanchement!