- Wrapped all the delegated methods inside try-catch wherever applicable.
 - Added a few utility functions like nullSafeGetPort etc.