Beginning to move functions into remix.js