Got both to a decent stopping point. (There's a lot more cleanup to do on ls.c but now is not the time...)