Converted code to class-style so it can accept custom abbreviations.

Okay, sorry about that last attempt at a pull request; this one is good.

Changes include converting code to use a class instead of a function which allows for a custom list of abbreviations (e.g. "GB", "MB", "grand", etc).