This thesis consists of three different topics which are related by their physics: 1. The dynamics of single magnetic atoms on metallic surfaces. 2. Lasing produced in multi-level double quantum dot systems which are coupled to electronic leads and a phonon bath. 3. Properties of the quantum master equation. An expansion of the quantum master equation in the coupling strength and in the correlation time of the environment is derived.