Removed unnecessary printfs to ensure performance
Removed calcPow2 memleak