Removed unused variable.
Replaced jQuery.bind with native bind.
Brackets rearranged to be more meaningful in self executing functions.