Now using explode instead of many substr functions, everything is now in the main switch