refactored the javascript to populate the models drop down.