output module draft finished

only outputs xlam elems

next:
- test all programs