fix issue with moment.js and js date object
fix some performance issues
fixing moment timestamps