Fixed tests to use beforeEach() etc
Changed tests from using .impl.write() to .raw incase the interface changes