Document : make `getAllLines` a method since it is expensive and change the return type to List

Also return List from `removeLines`