batches up inseserts to database and allowing the route to draw first
removes unused stuff