Replaced some ifs with a switch statement. Replaced an uneeded loop through a list (list.Remove() does this anyway) Signed-off-by: carnie <elly1989@rocketmail.com>