Refactoring accounting app.
Minor fixes.