Splitting off JS into separate file