Added code to locate enclosed spaces.