Moved stuff from BoilerPlate.