Improved naming
More idiomatic Python and clean up