Various fixes and improvements...