Improvements in variable management

- Support for object and entity var types
- Local and global var registering
- Better context management in effect processing
- Automatically register variables if they are not defined before they are set