Fixed ID parser and tests. Made test_elements code PEP8 compliant.