Clarify naming conventions
Re-organize utility functions
Break operation into two lines
Simplify logger handling