Removing hacky and hardcoded numbers related to substring positions.