Added lots of I/O functions; added sphinx docs