Apply changes from comments. Fix diffs from brenton/origin-server.