Large refactor using maps, better extends

Most of this is a straight refactor, generated output is the same however there are a few additional extends and surgical classes.
Is there any good reason for naming these things with words, rather than the standard 1-6? It just seems like added complexity to make some remember that "echo" means 5.