Fix a myriad of small issues

None of these added up to a PR on their own, but together they fix about 10ish open issues


#768 #1112 #1079 #1107 #1113 #1114 #1108 #1106