Simplify and clean code
Fix new jQuery versions support