Exception Handling and Functional Data Structure

Added code for exception handling in a better way using Option and Either