Klarna Interview Question

Take existing code, point issues and refactor it