Added support for gratuity commands

Updated unit tests
Added DB account definition
Lots of structural changes to standardize the functions