Removed the cap, implemented a method to validate if the recursion is
needed.

Improved performance of MySql inserts by doing a batch process.