Added moment.js and cleaned up code