Code cleanup.

I've replaced a ton of magic numbers with named constants.  This is for my own benefit, as I plan to incorporate my OreCore project into TConstruct, but with all of these integers floating around it's very hard to make any changes without breaking things.

More to come in later commits.