Tweaks to constructors to allow mode to be set