Minor fixes and some reformatting