style updates and bug fixes