major changes cache, template, custom events and stuff