Smart constructors for convenience.