Tidy and fix a few things