Pulling values out into constants and fixing a bug or two