Release 4.0.0

Pull to merge latest changes.