extracted some js to external files