Refactors method that sets open spaces