The main module
Now saves maps to text file