'w' and the rest of test3 working successfully!

Also fixed a couple of bugs