Style and pythonics cleanup