This if-else block should probably be a switch statement using enumerations instead of hard-coded values.