Bug fixes, preparing

In translating old project settings to new, fixed bug with empty arrays
Modified AJAX legend value fetch in anticipation of new features
Updated some comments