Modified the code to work with the current site

Made some changes..:)