General fixes all over the place