migrated cropToMap() to common function module and adjusted other programs to account for this.