refactoring to simplify code
encapsulate exceptions within bank details
replace switch statements with Func<T,t> strategy