Split elements.py into several modules.