Changed cachekey and added some cleanup code

Cleanup code to remove unclosed tags infront of shortcodes
Added template and fixed tab parsing