Refactored currency implementation to allow setting the cap