refactored forms and buy_sell logic