Added otcheck and minor fixes.