Collected fixes

A number of miscellaneous fixes and smaller features made over the past few months