Moved baseNumToDecimal and getIndexOfArray to new class