It would probably be better to start from scratch, it's not even close to up to date with current WP code it was meant to emulate.