DEVIDM-92: Trim the details.
DEVIDM-92: Removed unnecessary null check.
DEVIDM-92: Added some tests