Add support for empty lines.
Separate program tests.
Add test for newlines at the end of chains.