Constructing confidence intervals in high-dimensional models and dealing with pleiotropy in mendelian randomization