fixed a bug which enabled a new instance to use the same figure as previous ones.
Simplified some internal APIs.
Added support for legends in plots_class.
Extended support for legends to stock_analysis_class.