Merge trunk into 1.0 branch