Update function.js

Roman's style corrections