initialize properly and cleanup random tool.