Fixed the bug that didn't let the user switch between product categories. Also cleaned the code a little bit.