[Stable logic functionality] Merge with master branch, revision 36.