Made some tweaks and improved performance by 50 to 100%.