Large cleanup of the idle checks.   Fix a few issues in the DSL changes.