Fixed active category selector and cleaned up js