Create core.js

To hold the core functions