multiple fixes and design enhancement