tests and pep8 working

Tests created and working and pep8 mistakes fixed