raf support for specific event types

It still has bugs to fix, not sure if ticking variable does exactly what
we want