Review by core: Added @todo's to the javascript code and move some jQuery selection into vars