Various fixes + update Alert to 0.8.1

Update Alert to current version and modify times to ms.

Other fixes are mostly minor, check individual commit messages. I can squash a few commits if you like, but probably better to keep the commit messages for explanations.