Remove shiro-functions tld, organize part of the code.