Added the 'legacy' code from the original 2008 paper as a separate branch.