Replace bare constructor functions with new static member functions.

This matches contemporary Rust style.