Minor bugfixes and aesthetic changes