Replaced functions.js and setup basic structure