[TASK] Simplify code to increase legibility
[TASK] Add argument validation