Some applications of optimal stopping and control in finance and economics