Did surgery on BOPM implementation. Also Fixed error in standard deviation function.