Remerge 1263

combining PR 1228+1249+1263 into one because I don't see how else to merge them