Refactored return conditions

Refactored return conditions to something more meaningful in context.