Refactor tests and start to add closed attribute

* Implement Guard
* create a migration to add a 'closed' attribute
* Test refactors
Merge remote-tracking branch 'origin/master' into 2-0-stable
Merge remote-tracking branch 'origin/2-0-stable'