Change multiple inserts to batch insert
code clean up