replace instance variable with local variable, replaced time_ago_in_words with js method and removed some trailing white spaces
added note