reformating file page js to be wrapped with amd