refactored some code & updated jquery alias