Small fixes and cleanups.
Merge branch '3.0.merge' into 3.0