Applied some changes based on feedback from Daniel Kruegler.