Minor improvements

 - Altered for loops to prevent repeated evaluation of array length
 - Passed moment.js to IIFE so it can be called from local scope

(thanks /u/YuleTideCamel)
Fixed minor for loop bug
Added comments explaining inline styling
Merge branch 'reddit-fixes' into develop

Only a few fixes merged.  More will be added later.