small fixes
small PEP fixes, removed unused code