Bug fixes and refinements for 1.0 release