Added maptools.py