Total code refactoring.  The names of some functions have changed to more suitable.
Merge pull request #1 from folibis/mapreader

Total code refactoring.