Refactoring learn.js code

-simple refactor, not too much to do yet
-mainly removed unnecessary $(obj) calls