Refactoring and logging status (at most 1) (#10)