Fix assert_equal order and some small style adjustments