Remove pyflakes warnings
Add docstring for set_orientation