Improve method readability. Add missing code path test