Added slightly optimized bulk insert functionality