Some refactorings and improvements.
Merge branch '3.0' of github.com:hazelcast/hazelcast into 3.0