Rework OPENCOM/CLOSECOM logic. Fixes #35.