freepage done, Test 3 pass, Test 4 almost pass

freepage written, test 4 almost works (but not the part for freepage)