Remove switch statement