Add search parameter

Alse made PEP8 and Pyflakes corrections.