Refactored the interface for layer generators, making things more consistent
Moved terms.py to a location lower, that makes more sense
Separated the grammar from the parser