Implementing money parsing logic.