send correct element number when saving code snippet
lots of small fixes and improvements. add beginnings of learning module js