Mainly bugfixes and the like