Integrated the comments and suggestions of ticket #428 (https://github.com/GeoNode/geonode/issues/428)