Started work on 'close legend' functionality