move MalacheTool into a standalone file.