Pulling some stuff out into constants, some other small changes