jquery conflict & code refactors