added frequency dictionary tests
issue #6
optimize imports, try to fix pep8