updated code to provide a way to read back list of related items and
galleries..updated UT code to test more conditions.