Legend refactoring #283
Merge remote-tracking branch 'upstream/master'