Added some functions to read/write

I should probably test them, I need to at least test logic, but this is a step in the right direction