Major update

Major update including all the code from the WWW paper and significant performance improvements.