absracted handler and cache into their own module