Correcting demand profile resolve reference name and getting rid of unused functionality.
Adding crudflag to demand and removing some old functionality.
Merge branch 'dev' into pems
Partial: Pems AJAX