Now closing window if not in a project
Wrote tests