Add more tests and cleanup current ones

Add tests for access and one more for write. There are some new helper
functions so the test cases look nice.