A lot of little fixes