Refactored a lot of constants from strings to ints.