WARNING: This does not compile. Sync commit before major changes.