fixing caching, adding clearui

adding tests