Move js into js files instead of inline for stats