Use guard conditions and remove superfluous methods