Don't set visible function if it is already set
Make pep8 happy and remove remaining stuff