Use switch statement for better handling of different characters in module name