implemented Optimize action. Fixed a parameter setting bug on Stats & Status actions.