PEP-8 changes, removed unnecessary imports (numpy/scipy), disabled normalization, and removed duplicate code.