Added simple test for project euler solutions. Found one bug. Need to check. Refactored to get common repeated code at one place