Add element.as_chunk, fix bugs

- element.as_chunk was missing
- handle negatives in format_number
- don't freak out at the $ symbol in %defs%