Clean-up code. Remove `switch-case`, use js object

Feels cleaner this way to me.