Remove useless dependences
Simplify update function
Adapt legend postion