Language part 1.
Revert ccself stuff.
Minor refactoring to close some security holes and deduplicate code.