Bulk ingester fixes

Fixed bugs in bulk ingester and other cleanup