Fixing some issues, adding some other stuffs, a tool test also