Various fixes and niceties