Various style updates and minor bugfixes