PEP8ify and add util method