Refactored module_result method.

Signed off by: Diego Araújo <diegoamc90@gmail.com>