Minor changes. Add comments.
Use 'date' rather than 'datetime' when parsing bill dates.
Add DEBUG state.