Finally make this task work, refactor, apply style-guides, cry for 2hrs