Modified setElements and made this.$els and this.els into functions