Title drawing no longer invoked for empty title.

It used to be that the title drawing operation was run if the titleSpace was
greater than zero, even if the title was blank or not defined. This leads to all
kinds of unnecessary behavior, and conceptually confusing behavior, which only
made it this far because the drawing operations were rendering empty strings,
and so no actually doing anything. This commit fixes the logic, and the block of
code for rendering the title is now skipped if the title is undefined or the
empty string.
Cleaned up a few return values; added function descriptions.

In an attempt to make the source more readable, I've added a few block comments
explaining the behavior of some of the code. I also added return values for some
of the functions which should, for consistency, return something.