Changed the JSfile to a complete different approach
Modified the layout to comply with the new JS file