Fixes after rebase with master; style fixes from @seanbarclay