Exploring potential energy surfaces in ground and excited states Chemical reactivity of atoms molecules and ions is governed by their underlying potential energy surface. Calculating the whole potential energy surface within reasonable bounds is impossible for all but the smallest molecules. Usually only parts of the full potential energy surface can be studied namely stationary points and the minimum energy paths connecting them. By comparing energies of stationary points and their separating barriers conclusions regarding possible reactions mechanism or their infeasibility can be drawn. Taking excited states into account leads to further complications as now multiple potential energy surfaces have to be considered and root flips between different excited states may occur requiring effective state tracking. Part II of this thesis describes the required methods to locate stationary points and minimum energy paths on potential energy surfaces by using surface walking chain of states optimization and intrinsic reaction coordinate integration. Several approaches to state tracking are presented in chapter 4. Results of this thesis are presented in Part III containing two contributions to the field of photochemistry: chapter 12 provides a possible excited state reaction mechanism for a biaryl cross coupling reaction and offers a plausible explanation for its high regioselectivity. The second contribution is the development pysisyphus (chapter 13) an external optimizer implemented in python aware of excited states and thus the core of this thesis. By implementing the state tracking algorithms outlined in chapter 4 it allows effective and efficient optimizations of stationary points in ground and excited states. The performance of pysisyphus is verified for several established benchmark sets. Results for several excited state optimizations are presented in section 13.3 where pysisyphus shows good performance for the optimization of sizeable transition metal complexes.