General fixes and improvements for 1.0.6