Separated pow_n to an algorithms header and did the same for corresponding test file