Refactor: Moving out a method
Verifying result code