Improved performance by inserting array of objects. Fixed issue #16.