Improved directory and module structure, removed frontend, added print-to-file.