Removed unsused legendDirectives