Refactoring and bug fix.
* Bug: ruby didn't evaluate moment.js
* Use if statement instead of ternary operator.
Update README