Tidy current solution before refactor to something more robust