Tidy code and comment