Tidy code, typos, double declaration