Legend commit

committing initial code for legend.