I don't know why legendInterface is used and if we can remove it.
@NathanW2  do you think it will be the same to use QgsMapLayerRegistry ?
@volaya are you agree ?