streamlining javascript a little and adding a dummy view icon