Add gitignore, implement preliminary folding.

Reminder to add test files at a later time for unit testing.