Tidy and fixes