Added line wrap. Still buggy and needs bounds checking