Some cleanup for issues/1082