Log ExecutionPlan state changes

and minor changes/fixes
Merge pull request #51 from pitr-ch/refactor

Log ExecutionPlan state changes