Modified a couple of things, added method to write.

..to files in general