Use String as keys for sheets instead of Integer. Parts of the code expect the String to be convertible from and into an integer form, for the time being.

Notably switch(key) cannot be performed onto String before java 7 so it needs a rewrite