Refactor if/else into a switch statement
Refactor if/else into a switch statement

Also, extracts strings into constants

weaveworks/scope,weaveworks/scope,weaveworks/scope,weaveworks/scope,weaveworks/scope,weaveworks/scope