style updates and a few bug fixes