Reflected diffusions and applications to finance and operations management