Adding account currencies, and some refactoring