General improvements

Added key LatLon function. Fixed coding errors. Modified functionality of a few things to be more generalized.