Added back the stuff that got accidently reverted