added javascript elements and templates