Fixed tests and PEP8 stuff