changed to definitions

changed the mapping and plotting functions and point processing to
definitions in another .py file.

cleaned up alot of crap