Fix onEntityConstruction causing error

(And a tiny cleanup.)
Fix #25, keep backpack items with keepInventory