Changed the way Join and Where conditions are handled.