Created a feature to hide boxes and close the current box