Refactor for Smack 4.0.5