Move initializing of properties from initialize() to constructor.

Closes #3776
Fix failing test cases.