Removed switching on strings to make the code Java 1.7 compatible

(it was a bad idea anyway -- modified parts should be re-factored)