When was the type-writer first developed and patented?​