Various tweaks and cache related stuff