#136 Sort properties so that the longer ones will match when doing substitutions
#136 removing dead code