Added test case for factorial. Added fixes for string conversion