Added support for bet templates, proxy caching and entity equality