Remove virtually all code to start fresh.

This commit removes all logic for pattern analysis and filesystem/memory
management.

These features will be completely rewritten using new theories and a new
project structure.