Refactoring learn.js code

-simple refactor, not too much to do yet
-mainly removed unnecessary $(obj) calls
Small clean up of learn.js