Untested 1.7.8 support with minor preparations towards id changes.