Use http_response_code instead of header on invalid request
Improved a few functions & added documentation

Use array_walk() instead of foreach() making $selectors safe in
get_recent_posts(). Add the "`" when joining.

Made several variable names more descriptive.

Broke long lines of code (chained) up into multiple lines
Improved get_all_tags()