Fixed bug which caused $el not to be defined.
Added dependencies.