fix typo and use less and reaable code to impl the simple logic; deleted Model_StockHistory::search function; cleaned unnecessary code