Rewrote dispersion relation solver