Renaming and moving around functions, added on string funciton.
Made the write string function much better.