Remove unused `insert-lines`
Make `substring`, `splice` deals with end past-the-end
Use `substring` instead of `.substring`