Fix Substitutions

Make "sub" a Map<String, List<String>> and update the addSubstitution method and setSubstitutions methods accordingly.