Alphabetical output ordering

Added an ORDER BY clause to all SELECTs.
Behaviour on multiple args to filter + renaming

Multiple arguments to filter is handled by new function
filter_by_tags which dynamically builds a SELECT statement over all
given tags. Several functions were renamed to make their use clearer.
Error checking was added to some functions. main_filter was revised
to use the new filter_by_tags on multiple arguments and remove code
duplication.