Changed the Tools.toAmount(String) method to be more robust