Eradicated all perl switch/case blocks - fixes #45