renamed/commented functions
empty query results are no longer printed
rename/comment several functions
add print_category/comments