Add logic for expenses and refactor a bit