Move code to interpret sublines into a separate method
Added while command