more fixes, currently investigationg a floating point exception on the simple test