Modified the mysql queries and refactored the display products.