Added getNearbyEntities() method.