Refactor to add Result base type
warning fixes
refactor exit and return results to extend Result