Small cleanups

This is taken from https://github.com/crowbar/barclamp-swift/pull/155 ; we'll need to rebase the other bits, but these commits are simple and safe so splitting them here.