Move Line handlers to methods