Standardize parts of the code (renamed double-underscored functions and functions matching builtins).
Break down the logger in multiple functions.