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.
amount of indentation here seems excessive - just 4/8 spaces instead?