Make removeLine capable of removing the last line in the document