Added inventory layer, inventory array and spell management