Fixed some issues in the repeat tools, and optimized imports.