More random cleanups

There's a lot of random cleaning up in this one--see commit logs for details.

This shouldn't affect playd's functionality, but testing is encouraged.
tabs for alignment bad (i know, i know...)