More improvements, it compiles but it is untested