R: cleaning up a bit