Set correct offset for accessing test data. Fix pep8 errors.