Minor fixes and various changes