Distribusion interview question

Refactoring exercise + theoretical questions