Id lookup

contains pep8 fixes.