some cleanup for pillar module

* some cleanup
* pep8 fix