Complete the main write tests

Complete the main write tests