Edit to introduce some preliminary fixes in file structure, modularization, geolocation.