tabs --> spaces

Change-Id: I062b379189acfad6cbfeb8c86e9a1f17f4488811
Remove unused imports, re-order

Change-Id: I84e9aac6e8ee4f7d265301e4e87093183fc3f76c
PEP8-ify most of imagerecat.py

Change-Id: I5a4a7dd85eadf7233fe7e388644dadd5ba1e5ffc