DRY up Line controller function.