Initial commit of Stefan's code