All this stuff can be found on branch master_old.