Basic writing functions done, only parser remaining