Clean up on aisle ten!

Corrected version number, corrected sidebar template names, moved
sidebar is-active conditionals to functions.php, improved naming of
functions, and added function documentation.