cleanup a bit, addressing some comments of Luke