added and fixed many optiql unit tests