Quantum Tools and many bug fixes