Added functionality for building up the legend
Added ability to manipulate model for the legend