Fixing units bug, adding another test case, creating mutiple header write functions