This has been heavily refactored since and is not part of the current code.