Refactor of the whole application.

Input validation for currency