Some more or less random code added.