fix a couple warnings and don't manually new/delete stuff