Moved legend box position.
Merged sally's changes about legend.