Added two more ajax calls, move js code for ajax calls to plstats.js