Added AccountModel class that handles account creation, and arranged for it to be called from the command-line AccountTool.