style changes and various fixes