First attempt of merging head code to this branch.
Further steps are still required to finish this merge.
Authored by: keess 2007-02-18
Parent: [r1636]
Child: [r1638]