Restructured plot template and added separate file for plot JavaScript