Changed how Tool.cs worked and fixed a few bugs