Minor additions to working version