Moved some object creation out of the constructors, to prevent premature instantiation