Implement IO as well as some operations of heap-allocated strings