Add javascript function comment and add database struct