Move all javascript functions to scify.index.js