Remove code duplication to get the parent bundle and obj
Remove unused variable (leftover)