Added ClaferTools and fixed bugs