Merge pull request #3 from adrianob/make_map

make_map
make map matrix and move file operations to separate file
lots of things