Addded suppost for Maps.
Slight improvement in validation of input.