Added clear lines functionality