PEP8 and improve code readability.
PEP8 and improve code readability.
Review COUNT queries. Fix bugs introduced during previous commit (improve code readability).
Review report queries (according to COUNT queries).