Base code stuff.